[C#][Win32 API] PostMessage Help?

Posted by Rudi on Stack Overflow See other posts from Stack Overflow or by Rudi
Published on 2010-04-26T22:55:05Z Indexed on 2010/04/26 23:03 UTC
Read the original article Hit count: 546

Filed under:
|
|
|

I've looked at sites and MSDN documentation but I still don't understand the last parameter of PostMessage().

On forums in which people ask how to use PostMessage, people reply with one of two implementations:

  1. PostMessage(WindowHandle, WM_KEYDOWN, KeyCode, MapVirtualKey(KeyCode, 0) << 16);
  2. PostMessage(WindowHandle, WM_KEYDOWN, KeyCode, 0);

What's the difference? Why can the last parameter be left as 0 in some instances, but has to be 'shifted' and all that in other instances?

Just a quick question. Don't need essay replies (although they would be much appreciated). Any insight is appreciated. Thanks in advance.

© Stack Overflow or respective owner

Related posts about c#

Related posts about postmessage